{% extends "base.html" %}
{% load i18n %}

{% block head-css-ext %}
  <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/layout.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/datePicker.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/demo.css" media="screen" />
{% endblock %}

{% block head-js-ext %}
  <!-- jQuery -->
  <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.js"></script>
  <!-- required plugins -->
  <script type="text/javascript" src="{{MEDIA_URL}}js/date.js"></script>
  <script type="text/javascript" src="{{MEDIA_URL}}js/date_es.js"></script>
  <!--[if IE]><script type="text/javascript" src="{{MEDIA_URL}}js/jquery.bgiframe.js"></script><![endif]-->
  <!-- jquery.datePicker.js -->
  <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.datePicker.js"></script>  
{% endblock %}

{% block head-js-embedded %}
  <script type="text/javascript" charset="utf-8">
    $.dpText = {
              //TEXT_PREV_YEAR : 'DE Previous year',
              //TEXT_PREV_MONTH : 'DE Previous month',
              //TEXT_NEXT_YEAR : 'DE Next year',
              //TEXT_NEXT_MONTH : 'DE Next month',
              //TEXT_CLOSE : 'DE Close',
              TEXT_CHOOSE_DATE : 'Escoger Fecha'
    } 
    Date.firstDayOfWeek = 0;
    Date.format = 'yyyy-mm-dd';
    $(document).ready(function(){
        $('.date-pick').datePicker({
          startDate:'1900-01-01',
          clickInput:true
        });     
    });
  </script>
{% endblock %}

{% block content-box1 %}
<form method="post" action=".">{% csrf_token %}
  <table>
    <tr>
      <td><label for="id_factura">Numero de Factura :</label>{% if form.factura.errors %} <span class="error">{{ form.factura.errors|join:", " }}</span>{% endif %}</td>
      <td>{{ form.factura }}</td>
    </tr>
    <tr>
      <td><label for="id_fecha_ingreso">Fecha Factura :</label>{% if form.fecha_ingreso.errors %} <span class="error">{{ form.fecha_ingreso.errors|join:", " }}</span>{% endif %}</td>
      <td>{{ form.fecha_ingreso }}</td>
    </tr>
    <tr>
      <td><label for="id_valor_pedidol">Valor Tortal Factura :</label>{% if form.valor_pedido.errors %} <span class="error">{{ form.valor_pedido.errors|join:", " }}</span>{% endif %}</td>
      <td>{{ form.valor_pedido }}</td>
    </tr>
  </table>
  <br>
  <input type="submit" value="Agregar Factura" />
</form>
{% endblock %}

{% block content-colum2 %}
    {% if user.is_authenticated %}
        <ul>
            <li><a href="{% url inventario %}">Inventario</a></li>
        </ul>
    {% endif %}   
{% endblock %}